package com.itheima.d03;

import java.util.Objects;

public class test {
    public static void main(String[] args) {
        Pig pp1 = new Pig("小花", 2, "女");
        Pig pp2 = null;
        if(Objects.equals(pp1, pp2)){
            System.out.println("pp1和pp2相同");
        }else{
            System.out.println("pp1和pp2不相同");
        }


        }
    }
